home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
038a
/
bas_int1.zip
/
ISFILE.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-06-02
|
899b
|
23 lines
'=================================================================
'Message #4706 - Quick Basic Forum
' Date : 29-May-91
' From : Kevin Gmyrek
'Subject : File handling (Open error)
'
'FileExist - Converted from the Filexist subroutine posted in the
' QuickBASIC echo by Bob Perkins. This functions returns
' TRUE if the named file exists or FALSE otherwise. TRUE and
' FALSE should be global constants. Make sure you have
' included QB.BI as well as loaded the interrupt lib with QB
' /L from the DOS prompt.
'========================================================================
FUNCTION FileExist
testname$ = filename$ + CHR$(0)
InRegs.AX = &H4E00
InRegs.cx = &H0
InRegs.dx = SADD(testname$)
CALL INTERRUPT(&H21, InRegs, OutRegs)
FileExist = (OutRegs.flags AND &H1) XOR &H1
END FUNCTION